package com.gxlu.ms.start;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@EnableTransactionManagement // 所有serviceImpl方法都将启动事物扫描
//@SpringBootApplication
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})
@ComponentScan(basePackages={"com.gxlu.ms"})
@ImportResource("classpath:applicationContext.xml")
@ServletComponentScan(value = "com.gxlu.ms.web")
public class MicroServiceStart {

	public static void main(String[] args) {
		SpringApplication.run(MicroServiceStart.class,args);
		System.out.println(MicroServiceStart.class.getSimpleName()+"start success! ");
	}
}
 